package com.project.bean;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import java.time.LocalDate;

/**库存商品类*/
@Data
@ApiModel(value = "库存商品类")
@TableName("t_goods")
public class GoodsBean {
    /**批次号*/
    @ApiModelProperty(value = "批次号")
    @TableId(value = "g_groupId",type = IdType.INPUT)
    private String groupId;
    /**库存商品编号*/
    @ApiModelProperty(value = "库存商品编号")
    @TableField(value = "pk_goodsId")
    private Integer id;
    /**商品名*/
    @ApiModelProperty(value = "商品名")
    @TableField("g_name")
    private String name;
    /**商品规格*/
    @ApiModelProperty(value = "商品规格")
    @TableField("g_size")
    private String size;
    /**商品颜色*/
    @ApiModelProperty(value = "商品颜色")
    @TableField("g_color")
    private String color;
    /**产地*/
    @ApiModelProperty(value = "产地")
    @TableField("g_createAddress")
    private String createAddress;
    /**类型*/
    @ApiModelProperty(value = "类型")
    @TableField("g_type")
    private String type;
    /**出厂日期*/
    @ApiModelProperty(value = "出厂日期")
    @TableField("g_createDate")
    private LocalDate createDate;
    /**库存商品数量*/
    @ApiModelProperty(value = "库存商品数量")
    @TableField("g_num")
    private Integer num;
    /**状态*/
    @ApiModelProperty(value = "状态")
    @TableField("g_status")
    private String status = "未上架";

    public GoodsBean() {
    }

    public GoodsBean(String name, String size, String color, String createAddress, String type, LocalDate createDate, Integer num, String groupId, String status) {
        this.name = name;
        this.size = size;
        this.color = color;
        this.createAddress = createAddress;
        this.type = type;
        this.createDate = createDate;
        this.num = num;
        this.groupId = groupId;
        this.status = status;
    }

    public GoodsBean(Integer id, String name, String size, String color, String createAddress, String type, LocalDate createDate, Integer num, String groupId) {
        this.id = id;
        this.name = name;
        this.size = size;
        this.color = color;
        this.createAddress = createAddress;
        this.type = type;
        this.createDate = createDate;
        this.num = num;
        this.groupId = groupId;
    }


    @Override
    public String toString() {
        return "\nGoodsBean{" +
                "goodsId=" + id +
                ", name=" + name +
                ", size='" + size + '\'' +
                ", color='" + color + '\'' +
                ", createAddress='" + createAddress + '\'' +
                ", type='" + type + '\'' +
                ", createDate=" + createDate +
                ", num=" + num +
                ", groupId='" + groupId + '\'' +
                ", status='" + status + '\'' +
                '}';
    }

    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getSize() {
        return size;
    }

    public void setSize(String size) {
        this.size = size;
    }

    public String getColor() {
        return color;
    }

    public void setColor(String color) {
        this.color = color;
    }

    public String getCreateAddress() {
        return createAddress;
    }

    public void setCreateAddress(String createAddress) {
        this.createAddress = createAddress;
    }

    public String getType() {
        return type;
    }

    public void setType(String type) {
        this.type = type;
    }

    public LocalDate getCreateDate() {
        return createDate;
    }

    public void setCreateDate(LocalDate createDate) {
        this.createDate = createDate;
    }

    public Integer getNum() {
        return num;
    }

    public void setNum(Integer num) {
        this.num = num;
    }

    public String getGroupId() {
        return groupId;
    }

    public void setGroupId(String groupId) {
        this.groupId = groupId;
    }

    public String getStatus() {
        return status;
    }

    public void setStatus(String status) {
        this.status = status;
    }
}
